# 浮点型的计算会有误差
n1 = 5.164
n2 = 4.245
print(n1 + n2)

# round四舍五入，第二个参数表示保留几位小数，但会去掉0
n3 = round(n1 + n2, 2)
print(n3)

import math

# 向上取整 ceil
n4 = math.ceil(n1 + n2)
print(n4)
# 向下取整 floor
n5 = math.floor(n1 + n2)
print(n5)
